package Mediator;

public class System extends Mediator {
    private Colleague airport;
    private Colleague ravel;
    private Colleague hotel;
    private Colleague restaurant;
    private Colleague tourism;
    @Override
    public void createColleague() {
        airport = new Airport();
        ravel = new Ravel();
        hotel = new Hotel();
        restaurant = new Restaurant();
        tourism = new Tourism();
        airport.setMediator(this);
        ravel.setMediator(this);
        hotel.setMediator(this);
        restaurant.setMediator(this);
        tourism.setMediator(this);
    }
    @Override
    public void transmitConsumer(String name) {
        airport.addConsumer(name);
        ravel.addConsumer(name);
        hotel.addConsumer(name);
        restaurant.addConsumer(name);
        tourism.addConsumer(name);
    }

}
